package com.donzell.comm;

import org.springframework.ui.ModelMap;

public class CommControllerHelper {
	
	public static void bindErrMsgs(ModelMap map,String err_code,String err_message,String conform_url,String cancel_url){
		map.addAttribute("err_code", err_code);
		map.addAttribute("err_message", err_message);
		map.addAttribute("conform_url", conform_url);
		map.addAttribute("cancel_url", cancel_url);
		map.addAttribute("timestamp", System.currentTimeMillis()+"");
	}
	
	public static void bindSuccMsg(ModelMap map, String err_message,String conform_url,String cancel_url){
		map.addAttribute("err_code", "200");
		map.addAttribute("err_message", err_message);
		map.addAttribute("conform_url", conform_url);
		map.addAttribute("cancel_url", cancel_url);
		map.addAttribute("timestamp", System.currentTimeMillis()+"");
	}
	
}
